/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>PaymentQuickVerifyCode</p>  
<p>Description:�·�֧����֤��</p>
 */
public class PaymentQuickVerifyCode extends MerchantBaseRequest{
	
	private String notify_url;
	private String trade_no;//*����ش���[��Ӧ����],����������ţ���������������ƽ̨���صĶ�����
	private String mer_trace;//*����ش���[��Ӧ����],�̻�֧����ˮ���̻�ƽ̨���ɵı�ʶ�ñ�֧�����׵�Ψһ��ˮ�ţ�����ˮ�ű���Ψһ
	private String bank_mobile_id;//*����ش�������Ԥ���ֻ��ţ��ֿ��������п����ÿ�ʱ�����еǼǵ��ֻ���
	
	//(card_id��card_holder��identity_type��identity_code��valid_date��cvv2)��(p_agreement_id)��ѡһ���״�δ��ʱʹ��(card_id��)��������ǩԼ��ʹ��(p_agreement_id)����
	private String card_id;//���п��ţ�����CipherUtil.encrypt���ܱ���
	private String card_holder;//�ֿ�������������CipherUtil.encrypt���ܱ���
	private String identity_type;//�ֿ���֤�����ͣ��̶�Ϊ��1�����֤��
	private String identity_code;//�ֿ���֤���ţ�����CipherUtil.encrypt���ܱ���
	private String valid_date;//���ÿ���Ч�ڣ���ʽΪ��YYMM������CipherUtil.encrypt���ܱ���
	private String cvv2;//���ÿ�CVN2/CVV2������CipherUtil.encrypt���ܱ���
	private String p_agreement_id;//ǩԼЭ��ţ��û�ǩԼ��ֱ��ʹ��֧��ǩԼЭ��Ž����ٴ�֧������
	private String url = "/payment/quick/verifyCode";

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentQuickVerifyCode doRequest() throws Exception {
		Message<PaymentQuickVerifyCode> response = UMFUtil.post(createAPIContext(), this,PaymentQuickVerifyCode.class);
		MerchantBaseRequest baseResult = convertResult(response, PaymentQuickVerifyCode.class);
		if(baseResult == null)
			return null;
		return (PaymentQuickVerifyCode)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getCard_id() {
		return card_id;
	}

	public void setCard_id(String card_id) {
		this.card_id = card_id;
	}

	public String getP_agreement_id() {
		return p_agreement_id;
	}

	public void setP_agreement_id(String p_agreement_id) {
		this.p_agreement_id = p_agreement_id;
	}

	public String getBank_mobile_id() {
		return bank_mobile_id;
	}

	public void setBank_mobile_id(String bank_mobile_id) {
		this.bank_mobile_id = bank_mobile_id;
	}

	public String getCard_holder() {
		return card_holder;
	}

	public void setCard_holder(String card_holder) {
		this.card_holder = card_holder;
	}

	public String getIdentity_type() {
		return identity_type;
	}

	public void setIdentity_type(String identity_type) {
		this.identity_type = identity_type;
	}

	public String getIdentity_code() {
		return identity_code;
	}

	public void setIdentity_code(String identity_code) {
		this.identity_code = identity_code;
	}

	public String getValid_date() {
		return valid_date;
	}

	public void setValid_date(String valid_date) {
		this.valid_date = valid_date;
	}

	public String getCvv2() {
		return cvv2;
	}

	public void setCvv2(String cvv2) {
		this.cvv2 = cvv2;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentQuickVerifyCode [mer_id=");
		builder.append(mer_id);
		builder.append(", notify_url=");
		builder.append(notify_url);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", bank_mobile_id=");
		builder.append(bank_mobile_id);
		builder.append(", card_id=");
		builder.append(card_id);
		builder.append(", card_holder=");
		builder.append(card_holder);
		builder.append(", identity_type=");
		builder.append(identity_type);
		builder.append(", identity_code=");
		builder.append(identity_code);
		builder.append(", valid_date=");
		builder.append(valid_date);
		builder.append(", cvv2=");
		builder.append(cvv2);
		builder.append(", p_agreement_id=");
		builder.append(p_agreement_id);
		builder.append(", url=");
		builder.append(url);
		builder.append(", version=");
		builder.append(version);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}
}
